home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-12-06 | 45.8 KB | 1,052 lines |
-
-
-
-
- COPYDB(UNIX) 3/14/79 COPYDB(UNIX)
-
-
-
- NAME
- copydb - create batch files to copy out a data base and re-
- store it.
-
- SYNOPSIS
- _c_o_p_y_d_b [ -_u_n_a_m_e ] database full-path-name-of-directory [ re-
- lation ... ]
-
- DESCRIPTION
- _C_o_p_y_d_b creates two INGRES command files in the directory:
- _C_o_p_y._o_u_t, which contains Quel instuctions which will copy
- all relations owned by the user into files in the named
- directory, and _c_o_p_y._i_n, which contains instructions to copy
- the files into relations, create indexes and do modifies.
- The files will have the same names as the relations with the
- users INGRES id tacked on the end. (The directory MUST NOT
- be the same as the data base directory as the files have the
- same names as the relation files.) The -_u flag may be used
- to run _c_o_p_y_d_b with a different user id. (The fact that
- _c_o_p_y_d_b creates the copy files does not imply that the user
- can necessarily access the specified relation). If relation
- names are specified only those relations will be included in
- the copy files.
-
- _C_o_p_y_d_b is written in Equel and will access the database in
- the usual manner. It does not have to run as the INGRES
- user.
-
- EXAMPLE
- chdir /mnt/mydir
- copydb db /mnt/mydir/backup
- ingres db <backup/copy.out
- tp r1 backup
- rm -r backup
-
- tp x1
- ingres db <backup/copy.in
-
- DIAGNOSTICS
- _C_o_p_y_d_b will give self-explanatory diagnostics. If ``too
- many indexes'' is reported it means that more than ten
- indexes have been specified on one relation. The constant
- can be increased and the program recompiled. Other limits
- are set to the system limits.
-
- BUGS
- _C_o_p_y_d_b assumes that indexes which are ISAM do not need to be
- remodified. _C_o_p_y_d_b cannot tell if the relation was modified
- with a fillfactor or minpages specification. The _c_o_p_y._i_n
- file may be edited to reflect this.
-
-
-
-
-
-
-
- CREATDB(UNIX) 11/6/79 CREATDB(UNIX)
-
-
-
- NAME
- creatdb - create a data base
-
- SYNOPSIS
- _c_r_e_a_t_d_b [ -_u_n_a_m_e ] [ -_e ] [ -_m ] [ +__c ] [ +__q ] dbname
-
- DESCRIPTION
- Creatdb creates a new INGRES database, or modifies the
- status of an existing database. The person who executes
- this command becomes the Database Administrator (DBA) for
- the database. The DBA has special powers not granted to or-
- dinary users.
-
- _D_b_n_a_m_e is the name of the database to be created. The name
- must be unique among all INGRES users.
-
- The flags +__c and +__q specify options on the database. The
- form +_x turns an option on, while -_x turns an option off.
- The -_c flag turns off the concurrency control scheme (de-
- fault on). The +_q flag turns on query modification (default
- on).
-
- Concurrency control should not be turned off except on data-
- bases which are never accessed by more than one user. This
- applies even if users do not share data relations, since
- system relations are still shared. If the concurrency con-
- trol scheme is not installed in UNIX, or if the special file
- /dev/lock does not exist or is not accessible for read-write
- by INGRES, concurrency control acts as though it is off
- (although it will suddenly come on when the lock driver is
- installed in UNIX).
-
- Query modification must be turned on for the protection, in-
- tegrity, and view subsystems to work, however, the system
- will run slightly slower in some cases if it is turned on.
- It is possible to turn query modification on if it is al-
- ready off in an existing database, but it is not possible to
- turn it off if it is already on.
-
- Databases with query modification turned off create new re-
- lations with all access permitted for all users, instead of
- no access except to the owner, the default for databases
- with query modification enabled.
-
- Database options for an existing database may be modified by
- stating the -_e flag. The database is adjusted to conform to
- the option flags. For example:
-
- creatdb -e +q mydb
-
- turns query modification on for database ``mydb'' (but
- leaves concurrency control alone). Only the database ad-
- ministrator (DBA) may use the -_e flag.
-
- When query modification is turned on, new relations will be
- created with no access, but previously created relations
- will still have all access to everyone. The _d_e_s_t_r_o_y command
- may be used to remove this global permission, after which
- more selective permissions may be specified with the _p_e_r_m_i_t
- command.
-
- The INGRES user may use the -_u flag to specify a different
- DBA: the flag should be immediately followed by the login
- name of the user who should be the DBA.
-
- The -_m flag specifies that the UNIX directory in which the
- database is to reside already exists. This should only be
- needed if the directory if a mounted file system, as might
- occur for a very large database. The directory must exist
- (as .../_d_a_t_a/_b_a_s_e/_d_b_n_a_m_e), must be mode 777, and must be
- empty of all files.
-
- The user who executes this command must have the U_CREATDB
- bit set in the status field of her entry in the users file.
-
- The INGRES superuser can create a file in .../_d_a_t_a/_b_a_s_e con-
- taining a single line which is the full pathname of the lo-
- cation of the database. The file must be owned by INGRES
- and be mode 600. When the database is created, it will be
- created in the file named, rather than in the directory
- .../_d_a_t_a/_b_a_s_e. For example, if the file
- .../_d_a_t_a/_b_a_s_e/_e_r_i_c_d_b contained the line
-
- /mnt/eric/database
-
- then the database called ``ericdb'' would be physically
- stored in the directory /mnt/eric/database rather than in
- the directory .../data/base/ericdb.
-
- EXAMPLE
- creatdb demo
- creatdb -ueric -q erics_db
- creatdb -e +q -c -u:av erics_db
-
- FILES
- .../files/dbtmplt7
- .../files/data/base/*
- .../files/datadir/* (for compatibility with previous ver-
- sions)
-
- SEE ALSO
- demodb(unix), destroydb(unix), users(files), chmod(I),
- destroydb(quel), permit(quel)
-
- DIAGNOSTICS
- No database name specified.
- You have not specified the name of the database to
- create (or modify) with the command.
- You may not access this database
- Your entry in the users file says you are not authorized
- to access this database.
- You are not a valid INGRES user
- You do not have a users file entry, and can not do any-
- thing with INGRES at all.
- You are not allowed this command
- The U_CREATDB bit is not set in your users file entry.
- You may not use the -u flag
- Only the INGRES superuser may become someone else.
- <name> does not exist
- With -_e or -_m, the directory does not exist.
- <name> already exists
- Without either -_e or -_m, the database (actually, the
- directory) already exists.
- <name> is not empty
- With the -_m flag, the directory you named must be empty.
- You are not the DBA for this database
- With the -_e flag, you must be the database administra-
- tor.
-
-
-
-
-
-
- DESTROYDB(UNIX) 3/14/79 DESTROYDB(UNIX)
-
-
-
- NAME
- destroydb - destroy an existing database
-
- SYNOPSIS
- _d_e_s_t_r_o_y_d_b [ -_s ] [ -_m ] dbname
-
- DESCRIPTION
- _D_e_s_t_r_o_y_d_b will remove all reference to an existing database.
- The directory of the database and all files in that directo-
- ry will be removed.
-
- To execute this command the current user must be the data-
- base administrator for the database in question, or must be
- the INGRES superuser and have the -_s flag stated.
-
- The -_m flag causes _d_e_s_t_r_o_y_d_b not to remove the UNIX directo-
- ry. This is useful when the directory is a separate mounted
- UNIX file system.
-
- EXAMPLE
- destroydb demo
- destroydb -s erics_db
-
- FILES
- .../data/base/*
-
- SEE ALSO
- creatdb(unix)
-
- DIAGNOSTICS
- invalid dbname - the database name specified is not a valid
- name.
- you may not reference this database - the database may ex-
- ist, but you do not have permission to do anything with
- it.
- you may not use the -s flag - you have tried to use the -_s
- flag, but you are not the INGRES superuser.
- you are not the dba - someone else created this database.
- database does not exist - this database does not exist.
-
-
-
-
-
-
-
- EQUEL(UNIX) 3/14/79 EQUEL(UNIX)
-
-
-
- NAME
- equel - Embedded QUEL interface to C
-
- SYNOPSIS
- _e_q_u_e_l [ -_d ] [ -_f ] [ -_r ] file.q ...
-
- DESCRIPTION
- _E_q_u_e_l provides the user with a method of interfacing the
- general purpose programming language ``C'' with INGRES. It
- consists of the EQUEL pre-compiler and the EQUEL runtime li-
- brary.
-
- _C_o_m_p_i_l_a_t_i_o_n
-
- The precompiler is invoked with the statement:
-
- _e_q_u_e_l [<flags>] file1.q [<flags>] file2.q ...
-
- where file_n.q are the source input file names, which must
- end with ._q. The output is written to the file ``file_n.c''.
- As many files as wished may be specified.
- The flags that may be used are:
-
- -d Generate code to print source listing file name and
- line number when a run-time error occurs. This can be
- useful for debugging, but takes up process space. De-
- faults to off.
-
- -f Forces code to be on the same line in the output file
- as it is in the input file to ease interpreting C diag-
- nostic messages. EQUEL will usually try to get all C
- code lines in the output file on the same lines as they
- were in the input file. Sometimes it must break up
- queries into several lines to avoid C-preprocessor line
- overflows, possibly moving some C code ahead some
- lines. With the -_f flag specified this will never hap-
- pen and, though the line buffer may overflow, C lines
- will be on the right line. This is useful for finding
- the line in the source file that C error diagnostics on
- the output file refer to.
-
- -r Resets flags to default values. Used to supress other
- flags for some of the files in the argument list.
-
- The output files may than be compiled using the C compiler:
-
- _c_c file1.c file2.c ... -_l_q
-
- The -_l_q requests the use of the EQUEL object library.
-
- All EQUEL routines and globals begin with the characters
- "II", and so all globals variables and procedure names of
- the form II_x_x_x are reserved for use by EQUEL and should be
- avoided by EQUEL users.
-
- _B_a_s_i_c _S_y_n_t_a_x
-
- EQUEL commands are indicated by lines which begin with a
- double pound sign (``##''). Other lines are simply copied
- as is. All normal INGRES commands may be used in EQUEL and
- have the same effect as if invoked through the interactive
- terminal monitor. Only retrieve commands with no result re-
- lation specified have a different syntax and meaning.
-
- The format of retrieve without a result relation is modified
- to:
-
- ## retrieve (C-variable = a_fcn { , C-variable = a_fcn
- } )
-
- optionally followed (immediately) by:
-
- ## [ _w_h_e_r_e _q_u_a_l ]
- ## {
- /* C-code */
- ## }
-
- This statement causes the ``C-code'' to be executed once for
- each tuple retrieved, with the ``C-variable''s set appropri-
- ately. Numeric values of any type are converted as neces-
- sary. No conversion is done between numeric and character
- values. (The normal INGRES _a_s_c_i_i function may be used for
- this purpose.)
-
- Also, the following EQUEL commands are permitted.
-
- ## _i_n_g_r_e_s [ingres flags] data_base_name
- This command starts INGRES running, and directs all
- dynamically following queries to the database
- _d_a_t_a__b_a_s_e__n_a_m_e. It is a run-time error to execute this
- command twice without an intervening ``## exit'', as
- well as to issue queries while an ``## ingres'' state-
- ment is not in effect. Each flag should be enclosed in
- quotes to avoid confusion in the EQUEL parser:
-
- ## ingres "-f4f10.2" "-i212" demo
-
- ## _e_x_i_t
- Exit simply exits from INGRES. It is equivalent to the
- _\_q command to the teletype monitor.
-
- _P_a_r_a_m_e_t_r_i_z_e_d _Q_u_e_l _S_t_a_t_e_m_e_n_t_s
-
- Quel statements with target lists may be ``parametrized''.
- This is indicated by preceding the statement with the key-
- word ``param''. The target list of a parametrized statement
- has the form:
-
- ( _t_l__v_a_r, _a_r_g_v )
-
- where _t_l__v_a_r is taken to be a string pointer at execution
- time (it may be a string constant) and interpreted as fol-
- lows. For any parametrized EQUEL statement except a re-
- trieve without a result relation (no ``into rel'') (i.e. ap-
- pend, copy, create, replace, retrieve into) the string
- _t_l__v_a_r is taken to be a regular target list except that
- wherever a `%' appears a valid INGRES type (f4, f8, i2, i4,
- c) is expected to follow. Each of these is replaced by the
- value of the corresponding entry into _a_r_g_v (starting at 0)
- which is interpreted to be a pointer to a variable of the
- type indicated by the `%' sequence. Neither _a_r_g_v nor the
- variables which it points to need be declared to EQUEL. For
- example:
-
- char *argv[10];
-
- argv[0] = &double_var;
- argv[1] = &int_var;
- ## param append to rel
- ## ("dom1 = %f8, dom2 = %i2", argv)
- ## /* to escape the "%<ingres_type>" mechanism use "%%" */
- ## /* This places a single `%' in the string. */
-
- On a retrieve to C-variables, within _t_l__v_a_r, instead of the
- C-variable to retrieve into, the same `%' escape sequences
- are used to denote the type of the corresponding argv entry
- into which the value will be retrieved.
-
- The qualification of any query may be replaced by a string
- valued variable, whose contents is interpreted at run time
- as the text of the qualification.
-
- The _c_o_p_y statement may also be parametrized. The form of
- the parametrized _c_o_p_y is analogous to the other parametrized
- statements: the target list may be parametrized in the same
- manner as the _a_p_p_e_n_d statements, and furthermore, the
- _f_r_o_m/_i_n_t_o keyword may be replaced by a string valued vari-
- able whose content at run time should be _i_n_t_o or _f_r_o_m.
-
- _D_e_c_l_a_r_a_t_i_o_n_s
-
- Any valid C variable declaration on a line beginning with a
- ``##'' declares a C-variable that may be used in an EQUEL
- statement and as a normal variable. All variables must be
- declared before being used. Anywhere a constant may appear
- in an INGRES command, a C-variable may appear. The value of
- the C-variable is substituted at execution time.
-
- Neither nested structures nor variables of type _c_h_a_r (as op-
- posed to pointer to char or array of char) are allowed.
- Furthermore, there are two restrictions in the way variables
- are referenced within EQUEL statements. All variable usages
- must be dereferenced and/or subscripted (for arrays and
- pointers), or selected (for structure variables) to yield
- lvalues (scalar values). _C_h_a_r variables are used by EQUEL
- as a means to use _s_t_r_i_n_g_s. Therefore when using a _c_h_a_r ar-
- ray or pointer it must be dereferenced only to a ``_c_h_a_r *''.
- Also, variables may not have parentheses in their refer-
- ences. For example:
-
- ## struct xxx
- ## {
- int i;
- ## int *ip;
- ## } **struct_var;
-
- /* not allowed */
- ## delete p where p.ifield = *(*struct_var)->ip
-
- /* allowed */
- ## delete p where p.ifield = *struct_var[0]->ip
-
- C variables declared to EQUEL have either global or local
- scope. Their scope is local if their declaration is within
- a free (not bound to a retrieve) block declared to EQUEL.
- For example:
-
- /* globals scope variable */
- ## int Gint;
-
- func(i)
- int i;
- ## {
- /* local scope variable */
- ## int *gintp;
- ...
- ## }
-
- If a variable of one of the char types is used almost any-
- where in an EQUEL statement the content of that variable is
- used at run time. For example:
-
- ## char *dbname[MAXDATABASES + 1];
- int current_db;
- dbname[current_db] = "demo";
- ## ingres dbname[current_db]
-
- will cause INGRES to be invoked with data base ``demo''.
- However, if a variable's name is to be used as a constant,
- then the non-referencing operator `#' should be used. For
- example:
-
- ## char *demo;
-
- demo = "my_database";
-
- /* ingres -d my_database */
- ## ingres "-d" demo
-
- /* ingres -d demo */
- ## ingres "-d" #demo
-
- The C-preprocessor's #include feature may be used on files
- containing equel statements and declarations if these files
- are named _a_n_y_t_h_i_n_g._q._h. An EQUEL processed version of the
- file, which will be #included by the C-preprocessor, is left
- in _a_n_y_t_h_i_n_g._c._h.
-
- _E_r_r_o_r_s _a_n_d _I_n_t_e_r_r_u_p_t_s
-
- INGRES and run-time EQUEL errors cause the routine _I_I_e_r_r_o_r
- to be called, with the error number and the parameters to
- the error in an array of string pointers as in a C language
- main routine. The error message will be looked up and
- printed. before printing the error message, the routine
- (*IIprint_err)() is called with the error number that
- ocurred as its single argument. The error message
- corresponding to the error number returned by
- (*IIprint_err)() will be printed. Printing will be
- supressed if (*IIprint_err)() returns 0. IIprint_err may be
- reassigned to, and is useful for programs which map INGRES
- errors into their own error messages. In addition, if the
- ``-_d'' flag was set the file name and line number of the er-
- ror will be printed. The user may write an IIerror routine
- to do other tasks as long as the setting of IIerrflag is not
- modified as this is used to exit retrieves correctly.
-
- Interrupts are caught by equel if they are not being ig-
- nored. This insures that the rest of INGRES is in sync with
- the EQUEL process. There is a function pointer, IIinter-
- rupt, which points to a function to call after the interrupt
- is caught. The user may use this to service the interrupt.
- It is initialized to "exit()" and is called with -1 as its
- argument. For example:
-
- extern int (*IIinterrupt)();
- extern reset();
-
- setexit();
- IIinterrupt = reset;
- mainloop();
-
- To ignore interrupts, signal() should be called before the
- ## ingres satatement is executed.
-
- FILES
- .../files/error8_*
- Can be used by the user to decipher INGRES error
- numbers.
- .../lib/libq.a
- Run time library.
-
- SEE ALSO
- .../doc/other/equeltut.q, C reference manual, ingres(UNIX),
- quel(QUEL)
-
- BUGS
- The C-code embedded in the tuple-by-tuple retrieve operation
- may not contain additional QUEL statements or recursive in-
- vocations of INGRES.
-
- There is no way to specify an _i_1 format C-variable.
-
- Includes of an equel file within a parameterized target
- list, or within a C variable's array subscription brackets,
- isn't done correctly.
-
-
-
-
-
-
- HELPR(UNIX) 3/14/79 HELPR(UNIX)
-
-
-
- NAME
- helpr - get information about a database.
-
- SYNOPSIS
- _h_e_l_p_r [ -_u_n_a_m_e ] [ +__w ] database relation ...
-
- DESCRIPTION
- _H_e_l_p_r gives information about the named relation(s) out of
- the database specified, exactly like the _h_e_l_p command.
-
- Flags accepted are -_u and +__u. Their meanings are identical
- to the meanings of the same flags in INGRES.
-
- SEE ALSO
- ingres(unix), help(quel)
-
- DIAGNOSTICS
- bad flag - you have specified a flag which is not legal or
- is in bad format.
- you may not access database - this database is prohibited to
- you based on status information in the users file.
- cannot access database - the database does not exist.
-
-
-
-
-
-
-
- INGRES(UNIX) 3/14/79 INGRES(UNIX)
-
-
-
- NAME
- ingres - INGRES relational data base management system
-
- SYNOPSIS
- _i_n_g_r_e_s [ _f_l_a_g_s ] dbname [ process_table ]
-
- DESCRIPTION
- This is the UNIX command which is used to invoke INGRES.
- Dbname is the name of an existing data base. The optional
- flags have the following meanings (a ``+_'' means the flag
- may be stated ``+_x'' to set option _x or ``-_x'' to clear op-
- tion _x. ``-'' alone means that ``-_x'' must be stated to get
- the _x function):
-
- +_U Enable/disable direct update of the system rela-
- tions and secondary indicies. You must have the
- 000004 bit in the status field of the users file
- set for this flag to be accepted. This option is
- provided for system debugging and is strongly
- discouraged for normal use.
- -uname Pretend you are the user with login name _n_a_m_e
- (found in the users file). If _n_a_m_e is of the form
- :_x_x, _x_x is the two character user code of a user.
- This may only be used by the DBA for the database
- or by the INGRES superuser.
- -cN Set the minimum field width for printing character
- domains to _N. The default is 6.
- -ilN Set integer output field width to _N. _l may be 1,
- 2, or 4 for i1's, i2's, or i4's repectively.
- -flxM.N Set floating point output field width to _M charac-
- ters with _N decimal places. _l may be 4 or 8 to
- apply to f4's or f8's respectively. _x may be _e,
- _E, _f, _F, _g, _G, _n, or _N to specify an output for-
- mat. _E is exponential form, _F is floating point
- form, and _G and _N are identical to _F unless the
- number is too big to fit in that field, when it is
- output in _E format. _G format guarantees decimal
- point alignment; _N does not. The default format
- for both is _n_1_0._3.
- -vX Set the column seperator for retrieves to the ter-
- minal and print commands to be _X. The default is
- vertical bar.
- -rM Set modify mode on the _r_e_t_r_i_e_v_e command to _M. _M
- may be _i_s_a_m, _c_i_s_a_m, _h_a_s_h, _c_h_a_s_h, _h_e_a_p, _c_h_e_a_p,
- _h_e_a_p_s_o_r_t, or _c_h_e_a_p_s_o_r_t, for ISAM, compressed ISAM,
- hash table, compressed hash table, heap,
- compressed heap, sorted heap, or compressed sorted
- heap. The default is ``cheapsort''.
- -nM Set modify mode on the _i_n_d_e_x command to _M. _M can
- take the same values as the -_r flag above. De-
- fault is ``isam''.
- +_a Set/clear the autoclear option in the terminal
- monitor. It defaults to set.
- +_b Set/reset batch update. Users must the 000002 bit
- set in the status field of the users file to clear
- this flag. This flag is normally set. When
- clear, queries will run slightly faster, but no
- recovery can take place. Queries which update a
- secondary index automatically set this flag for
- that query only.
- +_d Print/don't print the dayfile. Normally set.
- +_s Print/don't print any of the monitor messages, in-
- cluding prompts. This flags is normally set. If
- cleared, it also clears the -_d flag.
- +_w Wait/don't wait for the database. If the +_w flag
- is present, INGRES will wait if certain processes
- are running (purge,restore, and/or sysmod) on the
- given data base. Upon completion of those
- processes INGRES will proceed. If the -_w flag is
- present, a message is returned and execution
- stopped if the data base is not available. If the
- +__w flag is omitted and the data base is unavail-
- able, the error message is returned if INGRES is
- running in foreground (more precisly if the stan-
- dard input is from a terminal), otherwise the wait
- option is invoked.
-
- _P_r_o_c_e_s_s__t_a_b_l_e is the pathname of a UNIX file which may be
- used to specify the run-time configuration of INGRES. This
- feature is intended for use in system maintenance only, and
- its unenlightened use by the user community is strongly
- discouraged.
-
- Note: It is possible to run the monitor as a batch-
- processing interface using the `<', `>' and `|' operators of
- the UNIX shell, provided the input file is in proper
- monitor-format.
-
- EXAMPLE
- ingres demo
- ingres -d demo
- ingres -s demo < batchfile
- ingres -f4g12.2 -i13 +b -rhash demo
-
- FILES
- .../files/users - valid INGRES users
- .../data/base/* - data bases
- .../datadir/* - for compatability with previous versions
- .../files/proctab8 - runtime configuration file
-
-
- SEE ALSO
- monitor(quel)
-
- DIAGNOSTICS
- Too many options to INGRES - you have stated too many flags
- as INGRES options.
- Bad flag format - you have stated a flag in a format which
- is not intelligible, or a bad flag entirely.
- Too many parameters - you have given a database name, a pro-
- cess table name, and ``something else'' which INGRES
- doesn't know what to do with.
- No database name specified
- Improper database name - the database name is not legal.
- You may not access database _n_a_m_e - according to the users
- file, you do not have permission to enter this database.
- You are not authorized to use the _f_l_a_g flag - the flag
- specified requires some special authorization, such as a
- bit in the users file, which you do not have.
- Database _n_a_m_e does not exist
- You are not a valid INGRES user - you have not been entered
- into the users file, which means that you may not use
- INGRES at all.
- You may not specify this process table - special authoriza-
- tion is needed to specify process tables.
- Database temporarily unavailable - someone else is currently
- performing some operation on the database which makes it
- impossible for you to even log in. This condition
- should disappear shortly.
-
-
-
-
-
-
-
- PRINTR(UNIX) 3/14/79 PRINTR(UNIX)
-
-
-
- NAME
- printr - print relations
-
- SYNOPSIS
- _p_r_i_n_t_r [ _f_l_a_g_s ] database relation ...
-
- DESCRIPTION
- _P_r_i_n_t_r prints the named relation(s) out of the database
- specified, exactly like the _p_r_i_n_t command. Retrieve permis-
- sion must be granted to all people to execute this command.
-
- Flags accepted are -_u, +__w, -_c, -_i, -_f, and -_v. Their mean-
- ings are identical to the meanings of the same flags in
- INGRES.
-
- SEE ALSO
- ingres(unix), print(quel)
-
- DIAGNOSTICS
- bad flag - you have specified a flag which is not legal or
- is in bad format.
- you may not access database - this database is prohibited to
- you based on status information in the users file.
- cannot access database - the database does not exist.
-
-
-
-
-
-
-
- PURGE(UNIX) 3/14/79 PURGE(UNIX)
-
-
-
- NAME
- purge - destroy all expired and temporary relations
-
- SYNOPSIS
- _p_u_r_g_e [ -_f ] [ -_p ] [ -_a ] [ -_s ] [ +__w ] [ database ... ]
-
- DESCRIPTION
- _P_u_r_g_e searches the named databases deleting system temporary
- relations. When using the -_p flag, expired user relations
- are deleted. The -_f flag will cause unrecognizable files to
- be deleted, normally purge will just report these files.
-
- Only the database administrator (the DBA) for a database may
- run purge, except the INGRES superuser may purge any data-
- base by using the -_s flag.
-
- If no databases are specified all databases for which you
- are the DBA will be purged. All databases will be purged if
- the INGRES superuser has specified the -_s flag. The -_a flag
- will cause purge to print a message about the pending opera-
- tion and execute it only if the response if a `y'. Any oth-
- er response is interpreted as ``no''.
-
- _P_u_r_g_e will lock the data base while it is being processed,
- since errors may occur if the database is active while purge
- is working on the database. If a data base is busy _p_u_r_g_e
- will report this and go on to the next data base, if any.
- If standard input is not a terminal _p_u_r_g_e will wait for the
- data base to be free. If -_w flag is stated _p_u_r_g_e will not
- wait, regardless of standard input. The +_w flag causes
- _p_u_r_g_e to always wait.
-
- EXAMPLES
- purge -p +w tempdata
- purge -a -f
-
- SEE ALSO
- save(quel), restore(unix)
-
- DIAGNOSTICS
- who are you? - you are not entered into the users file.
- not ingres superuser - you have tried to use the -_s flag but
- you are not the INGRES superuser.
- you are not the dba - you have tried to purge a database for
- which you are not the DBA.
- cannot access database - the database does not exist.
-
- BUGS
- If no database names are given, only the databases located
- in the directory _d_a_t_a/_b_a_s_e are purged, and not the old data-
- bases in _d_a_t_a_d_i_r. Explicit database names still work for
- databases in either directory.
-
-
-
-
-
-
-
- RESTORE(UNIX) 3/14/79 RESTORE(UNIX)
-
-
-
- NAME
- restore - recover from an INGRES or UNIX crash.
-
- SYNOPSIS
- _r_e_s_t_o_r_e [ -_a ] [ -_s ] [ +__w ] [ database ... ]
-
- DESCRIPTION
- _R_e_s_t_o_r_e is used to restore a data base after an INGRES or
- UNIX crash. It should always be run after any abnormal ter-
- mination to ensure the integrity of the data base.
-
- In order to run restore, you must be the DBA for the data-
- base you are restoring or the INGRES superuser and specify
- the -_s flag.
-
- If no databases are specified then all databases for which
- you are the DBA are restored. All databases will be re-
- stored if the INGRES superuser has specified the -_s flag.
-
- If the -_a flag is specified you will be asked before restore
- takes any serious actions. It is advisable to use this flag
- if you suspect the database is in bad shape. Using
- /dev/null as input with the -_a flag will provide a report of
- problems in the data base. If there were no errors while
- restoring a database, _p_u_r_g_e will be called, with the same
- flags that were given to _r_e_s_t_o_r_e, to remove unwanted files
- and system temporaries. _R_e_s_t_o_r_e may be called with the -_f
- and/or -_p flags for _p_u_r_g_e. Unrecognized files and expired
- relations are not removed unless the proper flags are given.
- In the case of an incomplete destroy, create or index _r_e_-
- _s_t_o_r_e will not delete files for partially created or des-
- troyed relations. _P_u_r_g_e must be called with the -_f flag to
- accomplish this.
-
- _R_e_s_t_o_r_e locks the data base while it is being processed. If
- a data base is busy _r_e_s_t_o_r_e will report this and go on to
- the next data base. If standard input is not a terminal _r_e_-
- _s_t_o_r_e will wait for the data base to be free. If the -_w
- flag is set _r_e_s_t_o_r_e will not wait regardless of standard in-
- put. If +_w is set it will always wait.
-
- _R_e_s_t_o_r_e can recover a database from an update which had fin-
- ished filling the batch file. Updates which did not make it
- to this stage should be rerun. Similarly modifies which
- have finished recreating the relation will be completed (the
- relation relation and attribute relations will be updated).
- If a destroy was in progress it will be carried to comple-
- tion, while a create will almost always be backed out. Des-
- troying a relation with an index should destroy the index so
- _r_e_s_t_o_r_e may report that a secondary relation has been found
- with no primary.
-
- If interrupt (signal 2) is received the current database is
- closed and the next, if any, is processed. Quit (signal 3)
- will cause restore to terminate.
-
- EXAMPLE
- restore -f demo
- restore -a grants < /dev/null
-
- DIAGNOSTICS
- All diagnostics are followed by a tuple from a system rela-
- tions.
-
- ``No relation for attribute(s)'' - the attributes listed
- have no corresponding entry in the relation relation
- ``No primary relation for index'' - the tuple printed is the
- relation tuple for a secondary index for which there is
- no primary relation. The primary probably was des-
- troyed the secondary will be.
- ``No indexes entry for primary relation'' - the tuple is for
- a primary relation, the relindxd domain will be set to
- zero. This is the product of an incomplete destroy.
- ``No indexes entry for index'' - the tuple is for a secon-
- dary index, the index will be destroyed. This is the
- product of an incomplete destroy.
- ``_r_e_l_n_a_m_e is index for'' - an index has been found for a
- primary which is not marked as indexed. The primary
- will be so marked. This is probably the product of an
- incomplete index command. The index will have been
- created properly but not modified.
- ``No file for'' - There is no data for this relation tuple,
- the tuple will be deleted. If, under the -_a option,
- the tuple is not deleted purge will not be called.
- ``No secondary index for indexes entry'' - An entry has been
- found in the indexes relation for which the secondary
- index does not exist (no relation relation tuple). The
- entry will be deleted.
-
- SEE ALSO
- purge(unix)
-
- BUGS
- If no database names are given, only the databases located
- in the directory _d_a_t_a/_b_a_s_e are restored, and not the old da-
- tabases in _d_a_t_a_d_i_r. Explicit database names still work for
- databases in either directory.
-
-
-
-
-
-
-
- SYSMOD(UNIX) 3/14/79 SYSMOD(UNIX)
-
-
-
- NAME
- sysmod - modify system relations to predetermined storage
- structures.
-
- SYNOPSIS
- _s_y_s_m_o_d [ -_s ] [ -_w ] dbname [ _r_e_l_a_t_i_o_n ] [ _a_t_t_r_i_b_u_t_e ] [
- _i_n_d_e_x_e_s ] [ _t_r_e_e ] [ _p_r_o_t_e_c_t ] [ _i_n_t_e_g_r_i_t_i_e_s ]
-
- DESCRIPTION
- _S_y_s_m_o_d will modify the relation, attribute, indexes, tree,
- protect, and integrities relations to hash unless at least
- one of the _r_e_l_a_t_i_o_n, _a_t_t_r_i_b_u_t_e, _i_n_d_e_x_e_s, _t_r_e_e, _p_r_o_t_e_c_t, or
- _i_n_t_e_g_r_i_t_i_e_s parameters are given, in which case only those
- relations given as parameters are modified. The system re-
- lations are modified to gain maximum access performance when
- running INGRES. The user must be the data base administra-
- tor for the specified database, or be the INGRES superuser
- and have the -_s flag stated.
-
- _S_y_s_m_o_d should be run on a data base when it is first created
- and periodically thereafter to maintain peak performance.
- If many relations and secondary indices are created and/or
- destroyed, _s_y_s_m_o_d should be run more often.
-
- If the data base is being used while _s_y_s_m_o_d is running, er-
- rors will occur. Therefore, _s_y_s_m_o_d will lock the data base
- while it is being processed. If the data base is busy, _s_y_s_-
- _m_o_d will report this. If standard input is not a terminal
- _s_y_s_m_o_d will wait for the data base to be free. If -_w flag
- is stated _s_y_s_m_o_d will not wait, regardless of standard in-
- put. The +_w flag causes _s_y_s_m_o_d to always wait.
-
- The system relations are modified to hash; the relation re-
- lation is keyed on the first domain, the indexes, attribute,
- protect, and integrities relations are keyed on the first
- two domains, and the tree relation is keyed on domains one,
- two, and five. The relation and attribute relations have
- the minpages option set at 10, the indexes, protect, and in-
- tegrities relations have the minpages value set at 5.
-
- SEE ALSO
- modify(quel)
-
-
-
-
-
-
- USERSETUP(UNIX) 3/14/79 USERSETUP(UNIX)
-
-
-
- NAME
- usersetup - setup users file
-
- SYNOPSIS
- .../_b_i_n/_u_s_e_r_s_e_t_u_p [ flags [ pathname ] ]
-
- DESCRIPTION
- The /_e_t_c/_p_a_s_s_w_d file is read and reformatted to become the
- INGRES users file, stored into .../_f_i_l_e_s/_u_s_e_r_s. If _p_a_t_h_n_a_m_e
- is specified, it replaces ``...''. If pathname is ``-'',
- the result is written to the standard output.
-
- The user name, user, and group id's are initialized to be
- identical to the corresponding entry in the /_e_t_c/_p_a_s_s_w_d
- file. The status field is initialized to be 000001, except
- for user _i_n_g_r_e_s, which is initialized to all permission bits
- set. If the _s_t_a_t_u_s parameter is provided, the field is set
- to this instead. The ``initialization file'' parameter is
- set to the file ._i_n_g_r_e_s in the user's login directory. The
- user code field is initialized with sequential two-character
- codes. All other fields are initialized to be null.
-
- After running _u_s_e_r_s_e_t_u_p, the _u_s_e_r_s file must be edited. Any
- users who are to have any special authorizations should have
- the status field changed, according to the specifications in
- users(files). To disable a user from executing INGRES en-
- tirely, completely remove her line from the users file.
-
- As UNIX users are added or deleted from the /_e_t_c/_p_a_s_s_w_d
- file, the _u_s_e_r_s file will need to be editted to reflect the
- changes. For deleted users, it is only necessary to delete
- the line for that user from the _u_s_e_r_s file. To add a user,
- you must assign that user a code in the form "aa" and enter
- a line in the users file in the form:
- name:cc:uid:gid:status:flags:proctab:initfile::databases
- where _n_a_m_e is the user name (taken from the first field of
- the /_e_t_c/_p_a_s_s_w_d file entry for this user), _c_c is the user
- code assigned, which must be exactly two characters long and
- must not be the same as any other existing user codes, _u_i_d
- and _g_i_d are the user and group ids (taken from the third and
- fourth fields in the /_e_t_c/_p_a_s_s_w_d entry), _s_t_a_t_u_s is the
- status bits for this user, normally 000000, _f_l_a_g_s are the
- default flags for INGRES (on a per-user basis), _p_r_o_c_t_a_b is
- the default process table for this user (which defaults to
- =_p_r_o_c_t_a_b_8), and _d_a_t_a_b_a_s_e_s is a list of the databases this
- user may enter. If null, she may use all databases. If the
- first character is a dash (``-''), the field is a comma
- separated list of databases which she may not enter. Other-
- wise, it is a list of databases which she may enter.
-
- The _d_a_t_a_b_a_s_e_s field includes the names of databases which
- may be created.
-
- _U_s_e_r_s_e_t_u_p may be executed only once, to initially create the
- _u_s_e_r_s file.
-
- FILES
- .../files/users
- /etc/passwd
-
- SEE ALSO
- ingres(unix), passwd(5), users(files)
-
- BUGS
- It should be able to bring the _u_s_e_r_s file up to date.
-
-
-